#ifndef OPEN_GL_WINDOW_CLASS
#define OPEN_GL_WINDOW_CLASS

#include "WindowClass.h"

/*******************************************************************************
  OpenGLWindow Class
*******************************************************************************/
class OpenGLWindow : public Window {
  public:
    OpenGLWindow();
    ~OpenGLWindow();

    virtual bool Create();
    virtual void Destroy();

    void SwapBuffers();
    bool MakeCurrent();

    //DefProcs
    static long DefGLActivate( Window& win, long wparam, long lparam );
    static long DefGLPaint( Window& win, long wparam, long lparam );
      long DefGLPaintBegin();
      long DefGLPaintEnd();

  protected:
    bool GetDC();
    bool GetPixelFormat();
    bool SetPixelFormat();
    void GeneratePFD();
    bool CreateContext();

  private:
    HDC hDC;
    HGLRC hRC;
    int pixelFormat;
    PIXELFORMATDESCRIPTOR pfd;
};

#endif // OpenGL Window Class
